package com.mapper;

import com.entity.Order;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Milburn
 * @create 2021-03-01 17:32
 */
@Repository
public interface OrderMapper {
    Order findOrderById(String order_id);

    Integer addOrder(Order order);

    Integer updateOrderStateToRefund(String order_id);//申请退票

    Integer updateOrderStateToRefunded(String order_id);//退票成功

    List<Order> findRefundOrderByUserName(String user_name);//根据用户名 查找退票订单

    List<Order> findOrdersByUserName(String user_name);//根据用户名 查找订单

    List<Order> findAllOrders();

    List<Order> findOrdersByScheduleId(long schedule_id);//根据排片查找订单

    List<Order> findOrdersByState(int order_state);
}
